from kivy.app import App
from kivy.lang import Builder
from kivy.properties import ObjectProperty, StringProperty
from kivy.uix.modalview import ModalView

Builder.load_file('goblinoid/profile/profilemodal.kv')


class ProfileModal(ModalView):
    pump_service = ObjectProperty(None)
    profile = ObjectProperty(None)
    username = StringProperty()

    def __init__(self, profile):
        super(ProfileModal, self).__init__()
        self.pump_service = App.get_running_app().pump_service
        self.profile = profile
        self.username = profile.username
